// pages/BillDetail/BillDetail.js
const app = getApp()
const utils = require('../../../utils/util.js')
const http = require('../../../utils/http.js');
Page({

  /**
   * 页面的初始数据
   */
  data: {
    detail: '',
    tops: Number(getApp().globalData.statusBarHeight + 48)

  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    var id = options.id;
    this.billDetails(id, {
      id: id
    })
  },
  //账单详情
billDetails(id,data) {
  let _this = this
 
  http.getRequest('v1/bill/'+id, data,
    function (res) {
      res.data.create_time = utils.formatTime(res.data.create_time, 'M-D h:m:s')
      _this.setData({
        detail: res.data
      })
    },
    function (err) {
    })
},

})